package cn.iune.erp.accounting;

import java.math.BigDecimal;
import java.sql.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Version;

import com.justep.baas.data.RowState;

/**
 * @author Administrator
 * 会计凭证明细表
 *
 */

@Entity
@Table(name = "AccountVoucherDetail")
@NamedQuery(name="AccountVoucherDetail.findAll", query="SELECT a FROM AccountVoucherDetail a")
public class AccountVoucherDetail {

	@Id
	@Column(length=36)
	private String fID;
	
	@Column(length=32)
	private String systemCode;
	@Column(length=4)
	private String billType;
	@Column(length=20)
	private String billTypeName;
	private Date orderDate;
	@Column(length=10)
	private String state = "active";
	@Column(length=10)
	private String status = "open";
	@Column(length=10)
	private String audit = "active";

	private int direction = 0;
	private Date confirmDate;
	
	@Column(length=5)
	private String serialNo;
	
	@Column(length=15)
	private String voucherNo;
	@Column(length=32)
	private String fMasterID;
	
	
	
	
	@Column(length=512)
	private String summarys;//摘要
	
	@Column(length=32)
	private String captionID;//科目编码
	@Column(length=10)
	private String captionNo;
	@Column(length=50)
	private String captionName;
	@Column(length=256)
	private String captionFullName;//科目名称
	
	@Column(precision=38,scale=2)
	private BigDecimal debitAmount = BigDecimal.ZERO;       //借方金额
	@Column(precision=38,scale=2)
	private BigDecimal creditAmount = BigDecimal.ZERO;       //贷方金额
	
	
	
	
	@Column(precision=38,scale=2)
	private BigDecimal balanceAmount = BigDecimal.ZERO;       //结存金额


	////////////////分录底稿///////////////////////
	@Column(precision=38,scale=2)
	private BigDecimal entryAmount = BigDecimal.ZERO;       //分录金额：用于填写借方和贷方金额
	private int dob =  1;//余额方向。1：借方余额，0：无余额，-1：贷方余额
	/////////////////////////////////////////////

	@Column(length=3)
	private String dealObject;
	@Column(length=20)
	private String dealObjectLabel;
	
	@Column(length=32)
	private String customerID;
	@Column(length=15)
	private String customerNo;
	@Column(length=20)
	private String cshortName;
	@Column(length=128)
	private String customerName;
	
	@Column(length=32)
	private String providerID;
	@Column(length=32)
	private String providerNo;
	@Column(length=20)
	private String pshortName;
	@Column(length=128)
	private String providerName;

	
//	@Column(length=65)
//	private String departmentNo;
//	@Column(length=256)
//	private String departmentName;
	@Column(length=256)
	private String employeeNo;
	@Column(length=256)
	private String employeeName;

	@Column(length=255)
	private String comments;
	
	@Column(length=65)
	private String userId;

	@Column(length=128)
	private String enterpriseNo;
	@Column(length=128)
	private String enterpriseName;

	@Version
	private int version = 0;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}
	public String getfID() {
		return fID;
	}
	public void setfID(String fID) {
		this.fID = fID;
	}
	public String getSystemCode() {
		return systemCode;
	}
	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}
	public String getBillType() {
		return billType;
	}
	public void setBillType(String billType) {
		this.billType = billType;
	}
	public String getBillTypeName() {
		return billTypeName;
	}
	public void setBillTypeName(String billTypeName) {
		this.billTypeName = billTypeName;
	}
	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getAudit() {
		return audit;
	}
	public void setAudit(String audit) {
		this.audit = audit;
	}
	public int getDirection() {
		return direction;
	}
	public void setDirection(int direction) {
		this.direction = direction;
	}
	public Date getConfirmDate() {
		return confirmDate;
	}
	public void setConfirmDate(Date confirmDate) {
		this.confirmDate = confirmDate;
	}
	
	public String getSerialNo() {
		return serialNo;
	}
	public void setSerialNo(String serialNo) {
		this.serialNo = serialNo;
	}
	public String getVoucherNo() {
		return voucherNo;
	}
	public void setVoucherNo(String voucherNo) {
		this.voucherNo = voucherNo;
	}
	public String getfMasterID() {
		return fMasterID;
	}
	public void setfMasterID(String fMasterID) {
		this.fMasterID = fMasterID;
	}
	public String getCaptionID() {
		return captionID;
	}
	public void setCaptionID(String captionID) {
		this.captionID = captionID;
	}
	public String getCaptionNo() {
		return captionNo;
	}
	public void setCaptionNo(String captionNo) {
		this.captionNo = captionNo;
	}
	public String getCaptionName() {
		return captionName;
	}
	public void setCaptionName(String captionName) {
		this.captionName = captionName;
	}
	public String getCaptionFullName() {
		return captionFullName;
	}
	public void setCaptionFullName(String captionFullName) {
		this.captionFullName = captionFullName;
	}
	public String getSummarys() {
		return summarys;
	}
	public void setSummarys(String summarys) {
		this.summarys = summarys;
	}
	public BigDecimal getDebitAmount() {
		return debitAmount;
	}
	public void setDebitAmount(BigDecimal debitAmount) {
		this.debitAmount = debitAmount;
	}
	public BigDecimal getCreditAmount() {
		return creditAmount;
	}
	public void setCreditAmount(BigDecimal creditAmount) {
		this.creditAmount = creditAmount;
	}
	public BigDecimal getBalanceAmount() {
		return balanceAmount;
	}
	public void setBalanceAmount(BigDecimal balanceAmount) {
		this.balanceAmount = balanceAmount;
	}
	public String getCustomerID() {
		return customerID;
	}
	public void setCustomerID(String customerID) {
		this.customerID = customerID;
	}
	public String getCustomerNo() {
		return customerNo;
	}
	public void setCustomerNo(String customerNo) {
		this.customerNo = customerNo;
	}
	public String getCustomerName() {
		return customerName;
	}
	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}
	public String getProviderID() {
		return providerID;
	}
	public void setProviderID(String providerID) {
		this.providerID = providerID;
	}
	public String getProviderNo() {
		return providerNo;
	}
	public void setProviderNo(String providerNo) {
		this.providerNo = providerNo;
	}
	public String getProviderName() {
		return providerName;
	}
	public void setProviderName(String providerName) {
		this.providerName = providerName;
	}
	public String getEmployeeNo() {
		return employeeNo;
	}
	public void setEmployeeNo(String employeeNo) {
		this.employeeNo = employeeNo;
	}
	public String getEmployeeName() {
		return employeeName;
	}
	public void setEmployeeName(String employeeName) {
		this.employeeName = employeeName;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getEnterpriseNo() {
		return enterpriseNo;
	}
	public void setEnterpriseNo(String enterpriseNo) {
		this.enterpriseNo = enterpriseNo;
	}
	public String getEnterpriseName() {
		return enterpriseName;
	}
	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	public String getDealObject() {
		return dealObject;
	}
	public void setDealObject(String dealObject) {
		this.dealObject = dealObject;
	}
	public String getDealObjectLabel() {
		return dealObjectLabel;
	}
	public void setDealObjectLabel(String dealObjectLabel) {
		this.dealObjectLabel = dealObjectLabel;
	}
	public String getCshortName() {
		return cshortName;
	}
	public void setCshortName(String cshortName) {
		this.cshortName = cshortName;
	}
	public String getPshortName() {
		return pshortName;
	}
	public void setPshortName(String pshortName) {
		this.pshortName = pshortName;
	}
	public BigDecimal getEntryAmount() {
		return entryAmount;
	}
	public void setEntryAmount(BigDecimal entryAmount) {
		this.entryAmount = entryAmount;
	}
	public int getDob() {
		return dob;
	}
	public void setDob(int dob) {
		this.dob = dob;
	}

}
